home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 19
/
CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso
/
CUCD
/
Readers
/
Gui4Cli
/
Tools
/
Rtn
/
FindFile
< prev
next >
Wrap
Text File
|
1997-12-02
|
1KB
|
56 lines
G4C
; FindFile FileName
; Ask the user to show us where he has the given file.
; Returns the filename
xONLOAD filename
; quit file here.. This seems weird, but remember that guiquit will just
; mark the gui for quiting. The gui will actually quit *after* it has
; executed all it's commands..
guiquit findfile
; check that we were given a file name
if $filename = ''
say '*ERROR: guis:tools/rtn/FindFile requires an argument!'
stop
endif
; check if the file already exists
ifexists file $filename
return $findfile/filename ; always use full variable path
endif
; ask for file
ezreq "$filename was not found..\n\nDo you want to look for it ?" "Browse..|Ignore|CANCEL" choice
if $choice = 0 ; no he don't
return ""
elseif $choice = 2 ; ignore
return "guis:c/comline"
endif
; go find the file..
name = ''
ReqFile -1 -1 300 200 "Locate $filename:" LOAD name ''
if $name = "" ; cancelled
return ""
elseifexists file $name
return $findfile/name ; success - Return *Full* variable Path!!
else
ezreq "File does not exist!\nWhat now.. ?" 'Continue..|CANCEL' choice
if $choice = 0 ; canceled
return ""
else
return "guis:c/comline" ; oh well..
endif
endif